@charset "utf-8";
@import "./variable.scss";
.lf {
    float: left;
}

.rt {
    float: right;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

@mixin fontSize($size, $color,$weight) {
  font-size:$size;
  color:$color;
  @if($weight != '') {
    font-weight:$weight;
  }
}

@mixin backgroundVerticalGradient($background1, $background2) {
    background: -moz-linear-gradient(top, $background1 0%, $background2 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, $background1), color-stop(100%, $background2));
    background: -webkit-linear-gradient(top, $background1 0%, $background2 100%);
    background: -o-linear-gradient(top, $background1 0%, $background2 100%);
    background: -ms-linear-gradient(top, $background1 0%, $background2 100%);
    background: linear-gradient(to bottom, $background1 0%, $background2 100%);
}
//水平方向
@mixin backgroundHorizontalGradient($background1, $background2) {

  background: -moz-linear-gradient(right, $background1 0%, $background2 100%);
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, $background1), color-stop(100%, $background2));
  background: -webkit-linear-gradient(right, $background1 0%, $background2 100%);
  background: -o-linear-gradient(right, $background1 0%, $background2 100%);
  background: -ms-linear-gradient(right, $background1 0%, $background2 100%);
  background: linear-gradient(to right, $background1 0%, $background2 100%);
}

//a链接样式
@mixin alink() {
    a {
        text-decoration: none;
        &:visited {
            color: #00c1de;
        }
        &:hover {
            color: #00c1de;
        }
        &:active {
            color: #00c1de;
        }
    }
}

//a链接样式
@mixin clearAStyle() {
    a,
    a:hover,
    a:focus,
    a:visited,
    a:active {
        text-decoration: none;
    }
}

//边框
@mixin border($bdColor) {
    border: 1px solid $bdColor;
}

//圆角
@mixin borderRadius($bdRadius, $direction:0) {
    @if($direction=='topLeft') {
        -webkit-border-top-left-radius: $bdRadius;
        -moz-border-top-left-radius: $bdRadius;
        -o-border-top-left-radius: $bdRadius;
        -ms-border-top-left-radius: $bdRadius;
        border-top-left-radius: $bdRadius;
    }
    @else if($direction=='topRight') {
        -webkit-border-top-right-radius: $bdRadius;
        -moz-border-top-right-radius: $bdRadius;
        -o-border-top-right-radius: $bdRadius;
        -ms-border-top-right-radius: $bdRadius;
        border-top-right-radius: $bdRadius;
    }
    @else if($direction=='bottomLeft') {
        -webkit-border-bottom-left-radius: $bdRadius;
        -moz-border-bottom-left-radius: $bdRadius;
        -o-border-bottom-left-radius: $bdRadius;
        -ms-border-bottom-left-radius: $bdRadius;
        border-bottom-left-radius: $bdRadius;
    }
    @else if($direction=='bottomRight') {
        -webkit-border-bottom-left-radius: $bdRadius;
        -moz-border-bottom-right-radius: $bdRadius;
        -o-border-bottom-right-radius: $bdRadius;
        -ms-border-bottom-right-radius: $bdRadius;
        border-bottom-right-radius: $bdRadius;
    }
    @else {
        -webkit-border-radius: $bdRadius;
        -moz-border-radius: $bdRadius;
        -o-border-radius: $bdRadius;
        -ms-border-radius: $bdRadius;
        border-radius: $bdRadius;
    }
}

//阴影
@mixin shadow($shadow...) {
    -webkit-box-shadow: $shadow;
    -moz-box-shadow: $shadow;
    box-shadow: $shadow;
}

//清除浮动
@mixin clearFloat() {
    content: "";
    display: table;
    clear: both;
}

//清除ul标签默认样式
@mixin ulStyleFormat() {
    margin: 0;
    padding: 0;
    list-style: none;
}

//清除label默认样式
@mixin labelFormat() {
    label {
        margin: 0;
        float: left;
    }
}

//强制不换行，显示省略号
@mixin whiteSpace() {
    white-space: nowrap; //段落中的文本不进行换行
    overflow: hidden;
    text-overflow: ellipsis;
}

//过渡
@mixin transition($tran) {
    -webkit-transition: $tran;
    -moz-transition: $tran;
    -o-transition: $tran;
    transition: $tran;
}

//变换
@mixin transform($tran) {
    -webkit-transform: $tran;
    -moz-transform: $tran;
    -o-transform: $tran;
    transform: $tran;
}

@mixin backgroundSize() {
    -webkit-background-size: 100% 100%;
    background-size: 100% 100%;
}

@mixin fullBgImg($url) {
    background: url($url) no-repeat;
    @include backgroundSize;
}

//设置滚动条样式
@mixin scrollbarStyle($width:$scrollBarWidth, $radius:4px, $bg:$scrollbarTrackBackground, $color:$scrollbarThumbColor) {
    //IE设置滚动条样式
    //scrollbar-3dlight-color:orange;
    //scrollbar-highlight-color:green;
    //firefox设置滚动条样式
    scrollbar-color:$color $bg;
    scrollbar-width:thin;
    scrollbar-face-color: $color; //滚动条颜色
    scrollbar-arrow-color: transparent; ///滚动条箭头颜色
    scrollbar-shadow-color: transparent; //滚动条边框
    scrollbar-dark-shadow-color: transparent;
    //scrollbar-base-color:purple;
    scrollbar-track-color: $bg; //滚动条底色
    //Chrome
    &::-webkit-scrollbar {
        width: $width;
        height: $width;
    }
    //滚动条底色
    &::-webkit-scrollbar-track-piece {
        background: $bg;
    }
    //滚动条颜色
    &::-webkit-scrollbar-thumb {
        background: $color;
        border-radius: $radius;
    }
    &::-webkit-scrollbar-thumb:hover {
        background: $color;
    }
}

@mixin requireStyle() {
    .require-style {
        color: red;
        display: inline-block;
        width: 8px;
    }
}

//box-sizing
@mixin boxSizing($con) {
    -webkit-box-sizing: $con;
    -moz-box-sizing: $con;
    box-sizing: $con;
}


//media
@mixin mediaScreen($size) {
  @if $size == xs{
    // < 768px
    @media screen and (max-width: 768px) {
      @content;
    }
  }@else if $size == sm{
    //  > 768px && < 992px
    @media screen and (min-width:768px) and (max-width:992px) {
      @content
    }
  }@else if $size == md{
    //  > 992px && < 1200px
    @media screen and (min-width:992px) and (max-width:1200px) {
      @content
    }
  }@else if $size == lg{
    //  > 1200px && < 1920px
    @media screen and (min-width:1200px) and (max-width:1920px) {
      @content
    }
  }@else{
    //  > 1920px
    @media screen and (min-width:1920px) {
      @content
    }
  }
}
//iframe
@mixin iframeStyle(){
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
//省略号
@mixin ellipsisOneRow(){
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
//省略号多行
@mixin ellipsisRows($rowNum){
  overflow : hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: $rowNum;
  -webkit-box-orient: vertical;
}
